package com.hsogoo.collate.service;

import com.hsogoo.collate.domain.CollateConfig;
import com.hsogoo.collate.mapper.CollateConfigMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author huangsaigang
 * Created @2019-10-28.
 */
@Slf4j
@Service
public class CollateConfigManager {

    @Autowired
    private CollateConfigMapper collateConfigMapper;

    public void addCollateConfig(CollateConfig collateConfig){
        collateConfig.initTime();
        collateConfigMapper.addCollateConfig(collateConfig);
    }

    public List<CollateConfig> getCollateConfigs(){
        return collateConfigMapper.getCollateConfigs();
    }
}
